Hi Allen,
It is possible to Flash a User Program to User Memory and set it to launch on power up. But we don't recommend doing this unless absolutely necessary because it will require you to keep track of what is flashed into each board. There will also be a few seconds of power on while the board boots before the program executes.
To be completely safe the Kanalog SWE output should be used in conjunction with some other output in a non-default state. The SWE output will only switch to ground after all other outputs are guaranteed to be in the default state. So then it requires both the board fully booted and an application to change a bit before things are enabled.
Another option is to make use of a spare KFlop GPIO bit. Those are guaranteed to be floating until an application (ie Mach3 RESET) configures them. So with the addition of a pull up resistor, those would be high from power up until Mach3 changes them.
Regards
TK
Group: DynoMotion |
Message: 914 |
From: Allen |
Date: 2/10/2011 |
Subject: Re: Call a program after power up |
I am using on of the GPIO to enable my drives and had to use a pull up resistor in order to get it to work properly. Hence my problem, the drives are enable in the high state so until mach3 takes control my drives are enabled. I know there is a delay but was hoping to toggle the output and disable the drives while the computer is booting and mach can take over. How would I code the c program to have it toggle just once after the board has been initialized? I know there will be a small delay while waiting for it to initialize but I am ok with that. It still beats having to wait for a minute or more while other things are loading.
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Allen,
>
> It is possible to Flash a User Program to User Memory and set it to launch on
> power up. But we don't recommend doing this unless absolutely necessary because
> it will require you to keep track of what is flashed into each board. There
> will also be a few seconds of power on while the board boots before the program
> executes.
>
> To be completely safe the Kanalog SWE output should be used in conjunction with
> some other output in a non-default state. The SWE output will only switch to
> ground after all other outputs are guaranteed to be in the default state. So
> then it requires both the board fully booted and an application to change a bit
> before things are enabled.
>
> Another option is to make use of a spare KFlop GPIO bit. Those are guaranteed
> to be floating until an application (ie Mach3 RESET) configures them. So with
> the addition of a pull up resistor, those would be high from power up until
> Mach3 changes them.
>
> Regards
> TK
>
>
>
>
> ________________________________
> From: Allen <agray@...>
> To: DynoMotion@yahoogroups.com
> Sent: Thu, February 10, 2011 9:08:29 AM
> Subject: [DynoMotion] Call a program after power up
>
> Â
> Is is possible upload a program that will issue a command only once per power
> cycle? Specifically I need SetBit(160) only once, not run in a loop, and I need
> to do this each time the board is booted.
>
> I am using that bit to enable the drives. On that output the drives are enabled
> as soon as the board boots, once mach loads it toggles and works fine.
>
> Thanks,
> Allen
>
|
|
Group: DynoMotion |
Message: 915 |
From: Tom Kerekes |
Date: 2/10/2011 |
Subject: Re: Call a program after power up |
Hi Allen,
The program would just be as shown below. Download it to a Thread. Set the "Launch on PowerUp" checkbox for the Thread. Then Flash User Memory. It should execute on the next power cycle.
#include "KMotionDef.h"
main() { SetBit(160); }
Regards
TK
Group: DynoMotion |
Message: 916 |
From: Allen |
Date: 2/10/2011 |
Subject: Re: Call a program after power up |
Oh ok, I had that much of the code. I assumed if uploaded to the board like that it would run in a loop and that something needed to be be added to break out of it.
That should do it then, thanks!
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Allen,
>
> The program would just be as shown below. Download it to a Thread. Set the
> "Launch on PowerUp" checkbox for the Thread. Then Flash User Memory. It should
> execute on the next power cycle.
>
> #include "KMotionDef.h"
> main()
> {
> Â Â Â SetBit(160);
> }
>
> Regards
> TK
>
>
>
> ________________________________
> From: Allen <agray@...>
> To: DynoMotion@yahoogroups.com
> Sent: Thu, February 10, 2011 11:16:20 AM
> Subject: [DynoMotion] Re: Call a program after power up
>
> Â
> I am using on of the GPIO to enable my drives and had to use a pull up resistor
> in order to get it to work properly. Hence my problem, the drives are enable in
> the high state so until mach3 takes control my drives are enabled. I know there
> is a delay but was hoping to toggle the output and disable the drives while the
> computer is booting and mach can take over. How would I code the c program to
> have it toggle just once after the board has been initialized? I know there will
> be a small delay while waiting for it to initialize but I am ok with that. It
> still beats having to wait for a minute or more while other things are loading.
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Allen,
> >
> > It is possible to Flash a User Program to User Memory and set it to launch on
> > power up.ÃÂ But we don't recommend doing this unless absolutely necessary
> >because
> >
> > it will require you to keep track of what is flashed into each board.ÃÂ There
> > will also be a few seconds of power on while the board boots before the program
> >
> > executes.
> >
> > To be completely safe the Kanalog SWE output should be used in
> >conjunctionÃÂ with
> >
> > some other output in a non-default state.ÃÂ The SWE output will only switch to
>
> > ground after all other outputs are guaranteed to be in the default state.ÃÂ So
>
> > then it requires both the board fully booted and an application to change a bit
> >
> > before things are enabled.
> >
> > Another option is to make use of a spare KFlop GPIO bit.ÃÂ Those are guaranteed
> >
> > to be floating until an application (ie Mach3 RESET) configures them.ÃÂ So with
> >
> > the addition of a pull up resistor, those would be high from power up until
> > Mach3 changes them.
> >
> > Regards
> > TK
> >
> >
> >
> >
> > ________________________________
> > From: Allen <agray@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Thu, February 10, 2011 9:08:29 AM
> > Subject: [DynoMotion] Call a program after power up
> >
> > ÃÂ
> > Is is possible upload a program that will issue a command only once per power
> > cycle? Specifically I need SetBit(160) only once, not run in a loop, and I need
> >
> > to do this each time the board is booted.
> >
> > I am using that bit to enable the drives. On that output the drives are enabled
> >
> > as soon as the board boots, once mach loads it toggles and works fine.
> >
> > Thanks,
> > Allen
> >
>
|
|
Group: DynoMotion |
Message: 917 |
From: Allen |
Date: 2/10/2011 |
Subject: Re: Call a program after power up |
That worked perfectly :)
Thanks
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Allen,
>
> The program would just be as shown below. Download it to a Thread. Set the
> "Launch on PowerUp" checkbox for the Thread. Then Flash User Memory. It should
> execute on the next power cycle.
>
> #include "KMotionDef.h"
> main()
> {
> Â Â Â SetBit(160);
> }
>
> Regards
> TK
>
>
>
> ________________________________
> From: Allen <agray@...>
> To: DynoMotion@yahoogroups.com
> Sent: Thu, February 10, 2011 11:16:20 AM
> Subject: [DynoMotion] Re: Call a program after power up
>
> Â
> I am using on of the GPIO to enable my drives and had to use a pull up resistor
> in order to get it to work properly. Hence my problem, the drives are enable in
> the high state so until mach3 takes control my drives are enabled. I know there
> is a delay but was hoping to toggle the output and disable the drives while the
> computer is booting and mach can take over. How would I code the c program to
> have it toggle just once after the board has been initialized? I know there will
> be a small delay while waiting for it to initialize but I am ok with that. It
> still beats having to wait for a minute or more while other things are loading.
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Allen,
> >
> > It is possible to Flash a User Program to User Memory and set it to launch on
> > power up.ÃÂ But we don't recommend doing this unless absolutely necessary
> >because
> >
> > it will require you to keep track of what is flashed into each board.ÃÂ There
> > will also be a few seconds of power on while the board boots before the program
> >
> > executes.
> >
> > To be completely safe the Kanalog SWE output should be used in
> >conjunctionÃÂ with
> >
> > some other output in a non-default state.ÃÂ The SWE output will only switch to
>
> > ground after all other outputs are guaranteed to be in the default state.ÃÂ So
>
> > then it requires both the board fully booted and an application to change a bit
> >
> > before things are enabled.
> >
> > Another option is to make use of a spare KFlop GPIO bit.ÃÂ Those are guaranteed
> >
> > to be floating until an application (ie Mach3 RESET) configures them.ÃÂ So with
> >
> > the addition of a pull up resistor, those would be high from power up until
> > Mach3 changes them.
> >
> > Regards
> > TK
> >
> >
> >
> >
> > ________________________________
> > From: Allen <agray@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Thu, February 10, 2011 9:08:29 AM
> > Subject: [DynoMotion] Call a program after power up
> >
> > ÃÂ
> > Is is possible upload a program that will issue a command only once per power
> > cycle? Specifically I need SetBit(160) only once, not run in a loop, and I need
> >
> > to do this each time the board is booted.
> >
> > I am using that bit to enable the drives. On that output the drives are enabled
> >
> > as soon as the board boots, once mach loads it toggles and works fine.
> >
> > Thanks,
> > Allen
> >
>
|
|
Group: DynoMotion |
Message: 918 |
From: miguels244 |
Date: 2/11/2011 |
Subject: Re: Call a program after power up |
One solution is to do it in hardware...and the safest one.
Time the boot period and use a delay relay to keep everything off till the controller wakes up. Better yet require a (pulsed) high from the control to keep things rolling using a charge pump.
It would be good to have a boot "execute once" option though.
--- In DynoMotion@yahoogroups.com, "Allen" <agray@...> wrote:
>
> Is is possible upload a program that will issue a command only once per power cycle? Specifically I need SetBit(160) only once, not run in a loop, and I need to do this each time the board is booted.
>
> I am using that bit to enable the drives. On that output the drives are enabled as soon as the board boots, once mach loads it toggles and works fine.
>
> Thanks,
> Allen
>
|
|
| | | |